package com.ruoyi.project.system.noticeRecord.service;

import java.util.List;
import java.util.Map;

import com.ruoyi.project.system.noticeRecord.domain.NoticeRecord;
import com.ruoyi.project.system.noticeRecord.domain.NoticeRecordDTO;
import com.ruoyi.project.system.noticeRecord.mapper.NoticeRecordMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.support.Convert;

/**
 * 通知通告发送记录 服务层实现
 * 
 * @author ruoyi
 * @date 2018-07-23
 */
@Service
public class NoticeRecordServiceImpl implements INoticeRecordService 
{
	@Autowired
	private NoticeRecordMapper noticeRecordMapper;

	/**
     * 查询通知通告发送记录信息
     * 
     * @param noticeRecordId 通知通告发送记录ID
     * @return 通知通告发送记录信息
     */
    @Override
	public NoticeRecord selectNoticeRecordById(Long noticeRecordId)
	{
	    return noticeRecordMapper.selectNoticeRecordById(noticeRecordId);
	}
	
	/**
     * 查询通知通告发送记录列表
     * 
     * @param noticeRecord 通知通告发送记录信息
     * @return 通知通告发送记录集合
     */
	@Override
	public List<NoticeRecord> selectNoticeRecordList(NoticeRecord noticeRecord)
	{
	    return noticeRecordMapper.selectNoticeRecordList(noticeRecord);
	}
	
    /**
     * 新增通知通告发送记录
     * 
     * @param noticeRecord 通知通告发送记录信息
     * @return 结果
     */
	@Override
	public int insertNoticeRecord(NoticeRecord noticeRecord)
	{
	    return noticeRecordMapper.insertNoticeRecord(noticeRecord);
	}
	
	/**
     * 修改通知通告发送记录
     * 
     * @param noticeRecord 通知通告发送记录信息
     * @return 结果
     */
	@Override
	public int updateNoticeRecord(NoticeRecord noticeRecord)
	{
	    return noticeRecordMapper.updateNoticeRecord(noticeRecord);
	}

	/**
     * 删除通知通告发送记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteNoticeRecordByIds(String ids)
	{
		return noticeRecordMapper.deleteNoticeRecordByIds(Convert.toStrArray(ids));
	}

	/**
	 * 获取当前用户通知发送记录
	 *
	 * @param map
	 * @return 结果
	 */
	@Override
	public List<NoticeRecordDTO> getNoticeRecordDTOList(Map<String, Object> map) {
		return noticeRecordMapper.getNoticeRecordDTOList(map);
	}

}
